package PTA.Mianxiangduixiang.ex42;
 public class P{
    private int x;
    private int y;
    private boolean kaiguan;

    public P() {
    }

    public P(int x, int y, boolean kaiguan) {
        this.x = x;
        this.y = y;
        this.kaiguan = kaiguan;
        check();
    }
    public void check(){
        if(this.kaiguan==true){
            System.out.println("on");
        }else{
            System.out.println("off");
        }
    }
}